package com.dcw.lixb.designmode.adapter;

/**
 * @author lixiaobin
 * @date 2020-07-17 16:30:25
 * @desc 描述信息
 */
public class AudioPlayer implements MediaPlayer {
    @Override
    public void play(String audioType, String fileName) {
        if ("mp3".equalsIgnoreCase(audioType)) {
            System.out.println("play mp3 file : "+fileName);
        } else if ("vlc".equalsIgnoreCase(audioType) || "mp4".equalsIgnoreCase(audioType)) {
            new MediaAdapter(audioType).play(audioType,fileName);
        }else {
            System.out.println("The type cannot be played");
        }
    }
}
